package com.wjc.homework;

import java.util.Arrays;

/**
 * @author wang'ji'cheng
 * @date 2025/7/11
 */
public class Homework01 {
    //返回数组的最大值
    public static void main(String[] args) {
        double[] arr = {1,2,3,4,5,6,7,8,9,10};
        double max = max(arr);
        System.out.println(max);

    }
    public static double max(double[] arr){
        double max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (max < arr[i]) {
                max = arr[i];
            }
        }
        return max;

    }

}

